package com.gx.dto.base.enums;

import lombok.Getter;

/**
 * @Author Liu-pj
 * @Date 2022/2/22 14:32
 * 状态码
 **/
@Getter
public enum ResultCodeEnum {
    /**
     * 状态信息
     */
    SUCCESS(200, "成功"),
    UNAUTHORIZED(401, "认证失败"),
    UNKNOWN_REASON(500, "未知错误,请稍后重试"),

    PARAM_ERROR(1001, "参数不正确"),
    DATA_NOT_EXIST(1002, "数据不存在"),
    DATA_IS_EXIST(1003, "数据已存在"),
    UPDATE_ERROR(1004, "修改失败"),
    CONFIG_NAME_IS_EXIST(1005, "表单名已存在"),
    CONFIG_NOT_EXIST(1006, "表单不存在"),


    USER_NOT_LOGIN(2001, "用户未登录"),
    USER_OR_PWD_ERROR(2003, "用户名或密码错误"),
    USER_CREDENTIALS_EXPIRED(2004, "用户密码过期"),
    USERNAME_IS_EXIST(2005, "用户名已存在"),
    PHONE_IS_EXIST(2006, "用户手机号已存在"),
    USER_BIND_ERROR(2007, "用户已被绑定"),
    TENANT_DATABASE_ERROR(2008, "租户不存在"),
    PASSWORD_COUNT_ERROR(2009, "用户密码错误次数上线,请五分钟后重试~"),


    UPLOAD_FAIL(3001, "上传失败"),
    EXCEL_IMPORT_FAIL(3002, "EXCEL导入失败"),
    EXCEL_EXPORT_FAIL(3003, "EXCEL导出失败");

    private final Integer code;
    private final String message;

    ResultCodeEnum(int code, String message) {
        this.code = code;
        this.message = message;
    }

}